import { request } from '../service'
import IBaseObj from '#/index'

const getProjectInfo = (pid: string) =>
  request({
    url: `/project/${pid}`,
    method: 'GET',
  })

const publishProject = (data: IBaseObj) =>
  request({
    url: '/project/publish',
    method: 'POST',
    data,
  })

const unpublishProject = (pid: string) =>
  request({
    url: `/project/unpublish/${pid}`,
    method: 'GET',
  })

export default {
  getProjectInfo,
  publishProject,
  unpublishProject,
}
